package com.patterns.chainOfResponsibility.wifelySubmission;

/**
 * Created by Xiao Yiyun on 2017/4/28.
 * 处理者儿子实现类
 */
public class Son extends Handler {
    //通过构造器的super()来告诉父类自己的处理级别
    //儿子只能处理母亲的请求
    public Son() {
        super(Handler.SON_LEVEL_REQUEST);
    }
    //儿子的答复
    protected void response(IWomen women) {
        System.out.println("-----------母亲向儿子请求-----------");
        System.out.println(women.getRequest());
        System.out.println("儿子的答复是：同意");
    }
}
